﻿function fixheight(f) {
    try {
        f.height = f.contentWindow.document.documentElement.scrollHeight + 10;
        if (f.height < 400)
            f.height = 400;
    }
    catch (ex) { }
}

function loadpage(a) {

    var myiframe = document.getElementById('myiframe');
    myiframe.src = a;

}

function loaditems(title, items) {
    document.writeln('<div class="sw_menu">');
    document.writeln('<h2>' + title + '</h2>');
    document.writeln('<ul>');
    $.each(items, function(name, link) {
        link = "'" + link + "'";
        var li = '<li>' + '<a href="javascript://"' + ' onclick="loadpage(' + link + ')"><strong>' + name + '</strong></a></li>';
        document.writeln(li);
    });
    document.writeln('</ul>');
    document.writeln('</div>');
}